// 班级相关
import request from "@/utils/request";
// 班级列表查询
export function getClassListAPI(data) {
  return request({
    url: "/tClass/list",
    method: "get",
    params: data,
  });
}

// 新建班级
export function saveClassAPI(data) {
  return request({
    url: "/tClass/save",
    method: "post",
    data: data,
  });
}

// 编辑班级
export function updateClassAPI(data) {
  return request({
    url: "/tClass/update",
    method: "post",
    data: data,
  });
}

// 查询单个班级详情
export function getClassDetailAPI(data) {
  return request({
    url: "/tClass/getById",
    method: "post",
    data: data,
  });
}

// 删除班级
export function deleteClassAPI(data) {
  return request({
    url: "/tClass/delete",
    method: "post",
    data: data,
  });
}

// 导出班级
export function exportClassListAPI(data) {
  return request({
    method: "post",
    url: "/tClass/exportClassList",
    responseType: "blob",
    headers: { "Content-Type": "application/json; application/octet-stream" },
    data: data,
  });
}

// 班级学员相关--------------------------------------------------------------------------------
// 班级学员列表
export function getMumberListAPI(data) {
  return request({
    url: "/tClass/studentList",
    method: "get",
    params: data,
  });
}

// 添加学员按钮弹窗列表
export function studentCourseListAPI(data) {
  return request({
    url: "/tClass/studentCourseList",
    method: "get",
    params: data,
  });
}

// 添加学员
export function addMumberAPI(data) {
  return request({
    url: "/tClass/addStudentToClass",
    method: "post",
    data: data,
  });
}

// 移除本班,调至其他班
export function removeMumberAPI(data) {
  return request({
    url: "/tClass/removeStudent",
    method: "post",
    data: data,
  });
}

// 点名情况相关--------------------------------------------------------------------------------
// 班级学员列表
export function getRollCallListAPI(data) {
  return request({
    url: "/tCourseOrder/orderList",
    method: "get",
    params: data,
  });
}

// 某课次详情
export function getRollCallDetailAPI(data) {
  return request({
    url: "/tCourseOrder/orderGetById",
    method: "post",
    data: data,
  });
}

// 某课次学员列表
export function getMumberListByRollCallIdAPI(data) {
  return request({
    url: "/tCourseOrder/orderStudentList",
    method: "get",
    params: data,
  });
}

// 修改某课次排班等内容
export function updateOrderInRollCallAPI(data) {
  return request({
    url: "/tCourseOrder/updateOrder",
    method: "post",
    data: data,
  });
}

// 删除课次
export function deleteOrderInRollCallAPI(data) {
  return request({
    url: "/tCourseOrder/deleteOrder",
    method: "post",
    data: data,
  });
}

// 课次里添加临时成员
export function addTempMemberAPI(data) {
  return request({
    url: "/tCourseOrder/addStudent",
    method: "post",
    data: data,
  });
}

// 导出签到情况表
export function exportOrderListAPI(data) {
  return request({
    method: "post",
    url: "/tCourseOrder/exportOrderList",
    responseType: "blob",
    headers: { "Content-Type": "application/json; application/octet-stream" },
    data: data,
  });
}

// 点名里更新成员的扣除额度和备注
export function updateBatchOrderAPI(data) {
  return request({
    url: "/tCourseOrder/updateBatchOrder",
    method: "post",
    data: data,
  });
}

// 导入班级--没用
export function importClassListAPI(data) {
  return request({
    url: "/tClass/importList",
    method: "post",
    data: data,
  });
}

// 上课记录-缺课补课列表
export function getMissedListAPI(data) {
  return request({
    url: "/tCourseOrder/orderListSecond",
    method: "get",
    params: data,
  });
}

// 上课记录导出
export function exportOrderListSecondAPI(data) {
  return request({
    url: "/tCourseOrder/exportOrderListSecond",
    method: "post",
    data: data,
    responseType: "blob",
    headers: { "Content-Type": "application/json; application/octet-stream" },
  });
}

// 上课记录-更新备注和状态
export function updateOrderByIdAPI(data) {
  return request({
    url: "/tCourseOrder/updateOrderById",
    method: "post",
    data: data,
  });
}

// 上课记录-缺课补课-查看详情
export function makeupDetailListAPI(data) {
  return request({
    url: "/tCourseOrder/repairDetail",
    method: "post",
    data: data,
  });
}

// 上课记录-缺课补课-开班补课-生成班级
export function updateMakeupClassAPI(data) {
  return request({
    url: "/tClass/saveRepair",
    method: "post",
    data: data,
  });
}

// 上课记录-缺课补课-开班补课-生成班级后进入新页面-点击完成开班补课
export function updateOpenClassAPI(data) {
  return request({
    url: "/tCourseOrder/saveRepair",
    method: "post",
    data: data,
  });
}

// 上课记录-缺课补课-点名记录-详情-保存修改记录
export function saveLogAPI(data) {
  return request({
    url: "/tLog/saveOrderUpdate",
    method: "post",
    data: data,
  });
}

// 上课记录-缺课补课-点名记录-详情-修改记录
export function getLogAPI(data) {
  return request({
    url: "/tLog/list",
    method: "get",
    params: data,
  });
}
